﻿using PoliAsis.Business;
using PoliAsis.Domain;
using PoliAsis.Domain.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace PoliAsis.Services
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
    [WebService(Namespace = "http://poliws2.somee.com")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]

    public class PolimiAssistant : System.Web.Services.WebService
    {
        [WebMethod]
        public PoliUser Login(string person_code, string password)
        {
            return PoliUtility.Login(person_code, password);
        }

        [WebMethod]
        public List<UserCurrentSchedule> GetUserCurrentSchedule(string auth_token)
        {
            return PoliUtility.GetUserSchedule(auth_token);
        }

        [WebMethod]
        public List<CourseInfo> GetUserCourses(string auth_token)
        {
            return PoliUtility.GetUserCourses(auth_token);
        }

        [WebMethod]
        public List<CourseInfo> GetUserNotPassCourses(string auth_token)
        {
            return PoliUtility.GetUserNotPassCourses(auth_token);
        }

        [WebMethod]
        public List<CourseExam> GetCourseExamCalls(string auth_token, int courseid)
        {
            return PoliUtility.GetCourseExamCalls(auth_token, courseid);
        }



        [WebMethod]
        public List<NomClassroom> SearchClassroom(string auth_token, string name)
        {
            return PoliUtility.SearchClassrom(auth_token, name);
        }

        [WebMethod]
        public UserProfile GetUserProfile(string auth_token)
        {
            return PoliUtility.GetUserProfile(auth_token);
        }

        [WebMethod]
        public BaseObject PushUserNotification(string auth_token, int course_exam_id)
        {
            return PoliUtility.PushNotification(auth_token, course_exam_id);
        }

        [WebMethod]
        public  List<CourseExam> GetListOfNotification(string auth_token)
        {
            return PoliUtility.GetListOfNotification(auth_token);
        }
    }
}